#include "A.h"
#include "B.h"
#include <iostream>
using namespace std;
int main()
{
	A* b_ptr = new B();
	cout << b_ptr->name() << endl;
	cout << (*b_ptr).name() << endl;
	A& b_ref = *b_ptr;
	cout << b_ref.name() << endl;
	//A b = *b_ptr;
	//cout << b.name() << endl;

	return 0;
}